package org.fastiot

import grails.testing.gorm.DomainUnitTest
import spock.lang.Specification

class GroupSpec extends Specification implements DomainUnitTest<Group> {

    def setup() {
    }

    def cleanup() {
    }

    void "Test a valid properties"() {
        given:
        def instance = new Group(code: code, name: name, customizations: customizations)

        when:
        instance.save(flush: true)

        then:
        !instance.hasErrors()

        where:
        code << ["g1", "g2"]
        name << ["分组1", "分组2"]
        customizations << [null, [hardwareVer: "334554321123322", softwareVer: "334554321123211"]]
    }
}
